package com.scuec.tourismwebsite.entity;

import lombok.Data;

import java.sql.Date;


@Data
public class Admin {
    private int admin_id;
    private String username;
    private String password;
    private String email;
    private String avatar;
    private Date create_date;
    private String operator;
    private String sex;
    public void setSex(String sex) {
        if ("男".equals(sex) || "女".equals(sex)) {
            this.sex = sex;
        } else {
            throw new IllegalArgumentException("Invalid sex value: " + sex + ". Sex must be '男' or '女'.");
        }
    }
}

